﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;

namespace CS795.TravelAgency.Domain.Entities.Configurations
{
    public class VendorConfiguration : EntityTypeConfiguration<Vendor>
    {
        public VendorConfiguration()
        {
            HasKey(p => p.Id);
            Property(p => p.Name).HasMaxLength(100).IsRequired();
            Property(p => p.Type).IsRequired();
            Property(p => p.ServiceURL).HasMaxLength(256).IsRequired();
            Property(p => p.Username).HasMaxLength(100).IsRequired();
            Property(p => p.Password).HasMaxLength(100).IsRequired();
        }
    }
}
